<template>
  <div>
        <van-nav-bar class="app-nav-bar" title="异常处理修改" left-arrow @click-left="onClickLeft"/>
        <el-form label-width="80px">
            <el-form-item label="学号:">
                {{tableData.studentNo}}
            </el-form-item>
            <el-form-item label="班级:">
                {{tableData.className}}
            </el-form-item>
            <el-form-item label="学生姓名:">
                {{tableData.studentName}}
            </el-form-item>
            <el-form-item label="宿舍:">
                {{tableData.dorAddress}}
            </el-form-item>
             <el-form-item label="处理状态:">
                <template>
                    <el-select v-model="tableData.status" placeholder="请选择">
                        <el-option
                        v-for="item in options"
                        :key="item.dictValue"
                        :label="item.dictLabel"
                        :value="item.dictValue">
                        </el-option>
                    </el-select>
                    </template>
            </el-form-item>
            <el-form-item label="处理描述:">
                <el-input
                    type="textarea"
                    placeholder="请输入内容"
                    v-model="tableData.processDesc"
                    show-word-limit>
                </el-input>
            </el-form-item>
            <el-button type="success" class="btncolor" @click="tj">提交</el-button>
        </el-form>
  </div>
</template>

<script>
export default {
data(){
        return{
            tableData:[],
            options:[],
            absenceProcessStatus:'',
            processDesc:"",
        }
    },
    methods:{
        async tj(){
            // var {data:res} = await this.request({
            //     url:'app/Attence/editExc',
            //     method:'post',
            //     data:this.$qs.stringify({
            //         id: this.$route.params.id,
            //         absenceProcessStatus: this.absenceProcessStatus,
            //         processDesc: this.processDesc
            //     })
            // })
            // console.log(res)
            // if(res.status==200){
            //      this.$toast.success(res.msg)
            //      this.$router.push('/AttenceExcList');
            // }
            // this.getUser();
        },
        onClickLeft(){
            this.$router.go(-1) 
        },
        async getUser(){
            var {data:res} =await this.request.get('app/Attence/getAppExcById?id='+this.$route.params.id)
            console.log(res);
            this.tableData=res.data;
            var {data:res} =await this.request.get('app/Attence/getProStatusListAll')
            console.log(res);
            this.options=res.data;
        },
        
    },created(){
        this.getUser();
    }
}
</script>

<style>
.el-form-item__label {
    text-align: right;
    vertical-align: middle;
    float: left;
    font-size: 14px;
    color: #606266;
    line-height: 40px;
    padding: 0 12px 0 0;
    box-sizing: border-box;
    width: 90px !important;
}
.el-form-item__content {
    line-height: 40px;
    position: relative;
    font-size: 14px;
    margin-left: 80px;
}
.el-form-item {
    margin-bottom: 5px!important;
}
.el-form{
    padding: 55px 16px!important;
}
.el-textarea {
    width: 60% !important;
}
.el-select>.el-input {
    width: 60% !important;
}
</style>